class CartItem

  attr_reader :product, :quantity, :price, :grind, :name
  
  def initialize(product, quantity, price, grind, name)
    @product = product
    @price = price
    @quantity = quantity
    @grind = grind
    @name = name
  end
  
  def increment_quantity(quantity)
    @quantity += quantity
  end
  
  def name
    @name
  end

  def id
    @product.id
  end
  
  def price
    #@product.p200 * @quantity
    @price * @quantity
  end

end